\(\int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx\) [1162]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 8 \[ \int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx=-\arcsin (5-2 x) \]

[Out]

arcsin(-5+2*x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {55, 633, 222} \[ \int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx=-\arcsin (5-2 x) \]

[In]

Int[1/(Sqrt[3 - x]*Sqrt[-2 + x]),x]

[Out]

-ArcSin[5 - 2*x]

Rule 55

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[1/Sqrt[a*c - b*(a - c)*x - b^2*x^2]
, x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 633

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*(-4*(c/(b^2 - 4*a*c)))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{\sqrt {-6+5 x-x^2}} \, dx \\ & = -\text {Subst}\left (\int \frac {1}{\sqrt {1-x^2}} \, dx,x,5-2 x\right ) \\ & = -\sin ^{-1}(5-2 x) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(44\) vs. \(2(8)=16\).

Time = 0.02 (sec) , antiderivative size = 44, normalized size of antiderivative = 5.50 \[ \int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx=\frac {2 \sqrt {-3+x} \sqrt {-2+x} \text {arctanh}\left (\frac {\sqrt {-2+x}}{\sqrt {-3+x}}\right )}{\sqrt {-((-3+x) (-2+x))}} \]

[In]

Integrate[1/(Sqrt[3 - x]*Sqrt[-2 + x]),x]

[Out]

(2*Sqrt[-3 + x]*Sqrt[-2 + x]*ArcTanh[Sqrt[-2 + x]/Sqrt[-3 + x]])/Sqrt[-((-3 + x)*(-2 + x))]

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(30\) vs. \(2(6)=12\).

Time = 0.19 (sec) , antiderivative size = 31, normalized size of antiderivative = 3.88

method result size
default \(\frac {\sqrt {\left (-2+x \right ) \left (3-x \right )}\, \arcsin \left (-5+2 x \right )}{\sqrt {-2+x}\, \sqrt {3-x}}\) \(31\)

[In]

int(1/(3-x)^(1/2)/(-2+x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

((-2+x)*(3-x))^(1/2)/(-2+x)^(1/2)/(3-x)^(1/2)*arcsin(-5+2*x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 32 vs. \(2 (6) = 12\).

Time = 0.22 (sec) , antiderivative size = 32, normalized size of antiderivative = 4.00 \[ \int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx=-\arctan \left (\frac {{\left (2 \, x - 5\right )} \sqrt {x - 2} \sqrt {-x + 3}}{2 \, {\left (x^{2} - 5 \, x + 6\right )}}\right ) \]

[In]

integrate(1/(3-x)^(1/2)/(-2+x)^(1/2),x, algorithm="fricas")

[Out]

-arctan(1/2*(2*x - 5)*sqrt(x - 2)*sqrt(-x + 3)/(x^2 - 5*x + 6))

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.97 (sec) , antiderivative size = 26, normalized size of antiderivative = 3.25 \[ \int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx=\begin {cases} - 2 i \operatorname {acosh}{\left (\sqrt {x - 2} \right )} & \text {for}\: \left |{x - 2}\right | > 1 \\2 \operatorname {asin}{\left (\sqrt {x - 2} \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(1/(3-x)**(1/2)/(-2+x)**(1/2),x)

[Out]

Piecewise((-2*I*acosh(sqrt(x - 2)), Abs(x - 2) > 1), (2*asin(sqrt(x - 2)), True))

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.75 \[ \int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx=\arcsin \left (2 \, x - 5\right ) \]

[In]

integrate(1/(3-x)^(1/2)/(-2+x)^(1/2),x, algorithm="maxima")

[Out]

arcsin(2*x - 5)

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 8, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx=2 \, \arcsin \left (\sqrt {x - 2}\right ) \]

[In]

integrate(1/(3-x)^(1/2)/(-2+x)^(1/2),x, algorithm="giac")

[Out]

2*arcsin(sqrt(x - 2))

Mupad [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 31, normalized size of antiderivative = 3.88 \[ \int \frac {1}{\sqrt {3-x} \sqrt {-2+x}} \, dx=-4\,\mathrm {atan}\left (\frac {\sqrt {x-2}-\sqrt {2}\,1{}\mathrm {i}}{\sqrt {3}-\sqrt {3-x}}\right ) \]

[In]

int(1/((x - 2)^(1/2)*(3 - x)^(1/2)),x)

[Out]

-4*atan(((x - 2)^(1/2) - 2^(1/2)*1i)/(3^(1/2) - (3 - x)^(1/2)))